import type { RouteRecordRaw } from 'vue-router'

const Layout = () => import('~/layouts/index.vue')

export const basicRouteMap = {
    // iframe模式下使用
    Iframe: () => import('~/pages/common/iframe.vue'),
    // 一般用于存在子集的页面
    RouteView: () => import('~/layouts/components/route-view.vue'),
    // 空页面
    ComponentError: () => import('~/pages/exception/component-error.vue'),
}
export default [
    {
        path: '/login',
        component: () => import('~/pages/login/index.vue'),
        meta: {
            title: '登录',
        },
    },
    {
        path: '/',
        redirect: '/home',
        name: 'home1',
        meta: {
            title: '首页',
            icon: 'DashboardOutlined',
        },
        component: Layout,
        children: [
            {
                path: '/home',
                name: 'home',
                component: () => import('~/pages/home/index.vue'),
                meta: {
                    title: '首页',
                },
            },
        ],
    },
] as RouteRecordRaw[]
